package com.algebra.activiti.service;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.task.Task;

import java.util.List;

/**
 * @author haha
 */
public interface ActivitiService {

    /**启动流程*/
    void startProcesses(String id, String businessKey);

    /**根据用户id查询待办任务列表*/
    List<Task> findTasksByUserId(String userId);

    /**任务审批 	（通过/拒接）*/
    void completeTask(String taskId, String userId, String result);

    /**更改业务流程状态*/
    void updateBizStatus(DelegateExecution execution, String status);

    /**流程节点权限用户列表*/
    List<String> findUsersForSL(DelegateExecution execution);

    /**流程节点权限用户列表*/
    List<String> findUsersForSP(DelegateExecution execution);

    Task findTaskById(String taskId);

}
